package com.qing.library_manager.service.manager.book;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qing.library_manager.domain.dto.BookDTO;
import com.qing.library_manager.domain.entity.Book;
import com.qing.library_manager.domain.query.BookQuery;
import com.qing.library_manager.common.util.ResponseResult;
import com.qing.library_manager.domain.query.BookQueryByName;
import com.qing.library_manager.domain.query.BookQueryByPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:yjx
 */
public interface bookService extends IService<Book> {

    /**
     * 新增图书
     * @param bookDTO
     * @return
     */

    ResponseResult increaseBook(BookDTO bookDTO);

    /**
     * 更新图书
     * @param bookDTO
     * @return
     */
    ResponseResult updateBookByName(BookDTO bookDTO);

    /**
     * 删除图书
     * @param bookShowId
     * @return
     */
    ResponseResult deleteBookByName(int bookShowId);

    /**
     * 查询书籍
     * @return
     */
    ResponseResult queryAllBookInit(BookQueryByName bookQueryByName);

    /**
     * 根据id查询图书信息
     */
    ResponseResult queryBookById(int bookShowId);

    /**
     * 分页查询图书
     * @param page
     * @param bookQueryByPage
     * @return
     */
    ResponseResult queryBookByPage(int page,int pageSize,BookQueryByPage bookQueryByPage);

    /**
     * 获得全部数据
     * @return
     */
    ResponseResult queryAllBook();
}
